<template>
  <div class="app">
    <!-- <h1>app---{{ $store.state.counter }}</h1> -->
    <h1>counter:{{ counter.count }}</h1>
    <Child></Child>
  </div>
</template>
<script setup>
import { onMounted } from 'vue'
import Child from './Child.vue'
import { useCounterStore } from '@/stores/counter'
const counter = useCounterStore()
// const increment = () => {
//   counter.$patch({ count: counter.count + 1 })
//   // counter.increment()
// }
onMounted(() => {
  counter.getTodos()
})

console.log(counter.todos)
</script>
<style lang="scss" scoped></style>
